#ifndef	__ACCELEROMETER_H
#define __ACCELEROMETER_H
#include <pebble.h>

#define	ADD_ACC			0x30

#define	REG_CTRL1		0x20
#define	REG_CTRL2		0x21
#define	REG_CTRL3		0x22
#define	REG_CTRL4		0x23
#define	REG_CTRL5		0x24
#define	REG_CTRL6		0x25
#define	REG_FIFOCTRL	0x2E
#define	REG_FIFOSRC		0x2F
#define	REG_INTCFG		0x30
#define	REG_INTCOUNTER	0x0E
#define	REG_INTDURATION	0x33
#define	REG_INTSRC		0x31
#define	REG_INTTHS		0x32
#define	REG_OUTXL		0x28
#define	REG_OUTXH		0x29
#define	REG_OUTYL		0x2A
#define	REG_OUTYH		0x2B
#define	REG_OUTZL		0x2C
#define	REG_OUTZH		0x2D
#define	REG_REFERENCE	0x26
#define	REG_STATUS		0x27
#define	REG_STATUSAUX	0x07
#define	REG_TAPCFG		0x38
#define	REG_TAPSRC		0x39
#define	REG_TAPTHS		0x3a
#define	REG_TEMPCFG		0x1F
#define	REG_TIMELIMIT	0x3b
#define	REG_TIMELATENCY	0x3C
#define	REG_TIMEWINDOW	0x3D
#define	REG_WHOIAM		0x0F

typedef	ubyte(*AccProc)(int,int,int,ubyte);

void	accelerometer_deinit(void);
ubyte	getStatus			(void);
ubyte	getStatusEx			(AccProc);
void	accelerometer_init	(void);

#endif